package com.example.demo.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;

@Getter
@TableName(value = "Product")
public class Product {
    @TableId(type = IdType.AUTO)
    private Integer product_id;//商品id

    @TableField("product_name")
    private String product_name;//商品名称

    @TableField("product_class")
    private String product_class;//商品类别

    @TableField("product_price")
    private float product_price;//商品价格

    @TableField("product_stock")
    private int product_stock;//商品库存

    @TableField("product_picture")
    private String product_picture;//商品图片

    @TableField("sale_amount")
    private int sale_amount;//销售量

    @TableField("like_number")
    private int like_number;//点赞数量


    public Product(Integer product_id, String product_name, String product_class, float product_price, int product_stock, String product_picture, int sale_amount, int like_number) {
        this.product_id = product_id;
        this.product_name = product_name;
        this.product_class = product_class;
        this.product_price = product_price;
        this.product_stock = product_stock;
        this.product_picture = product_picture;
        this.sale_amount = sale_amount;
        this.like_number = like_number;
    }

    public Product(String product_name, String product_class, float product_price, int product_stock, String product_picture, int sale_amount, int like_number) {
        this.product_name = product_name;
        this.product_class = product_class;
        this.product_price = product_price;
        this.product_stock = product_stock;
        this.product_picture = product_picture;
        this.sale_amount = sale_amount;
        this.like_number = like_number;
    }

    public Product() {
    }

    public void setProduct_id(Integer product_id) {
        this.product_id = product_id;
    }

    public void setProduct_name(String product_name) {
        this.product_name = product_name;
    }

    public void setProduct_class(String product_class) {
        this.product_class = product_class;
    }

    public void setProduct_price(float product_price) {
        this.product_price = product_price;
    }

    public void setProduct_stock(int product_stock) {
        this.product_stock = product_stock;
    }

    public void setProduct_picture(String product_picture) {
        this.product_picture = product_picture;
    }

    public void setSale_amount(int sale_amount) {
        this.sale_amount = sale_amount;
    }

    public void setLike_number(int like_number) {
        this.like_number = like_number;
    }

    public Integer getProduct_id() {
        return product_id;
    }

    public String getProduct_name() {
        return product_name;
    }

    public String getProduct_class() {
        return product_class;
    }

    public float getProduct_price() {
        return product_price;
    }

    public int getProduct_stock() {
        return product_stock;
    }

    public String getProduct_picture() {
        return product_picture;
    }

    public int getSale_amount() {
        return sale_amount;
    }

    public int getLike_number() {
        return like_number;
    }

    @Override
    public String toString() {
        return "Product{" +
                "product_id=" + product_id +
                ", product_name='" + product_name + '\'' +
                ", product_class='" + product_class + '\'' +
                ", product_price=" + product_price +
                ", product_stock=" + product_stock +
                ", product_picture='" + product_picture + '\'' +
                ", sale_amount=" + sale_amount +
                ", like_number=" + like_number +
                '}';
    }
}
